﻿class ForguncyPluginTemplateCellType extends Forguncy.Plugin.CellTypeBase {
    createContent(): JQuery {
        // 获取MyProperty属性值，注意，这里的MyProperty应该与 ForguncyPluginTemplateCellType.cs 文件定义的属性名一致
        var cellParam = this.CellElement.CellType as ForguncyPluginTemplateCellTypeParam;
        const propValue = cellParam.MyProperty;

        // 构建 Jquery Dom 并返回
        const div = $("<div>" + propValue + "<div>")

        div.css("color", "Red"); // 字体颜色设置为红色

        return div;
    }
}
interface ForguncyPluginTemplateCellTypeParam {
    MyProperty: string
}

Forguncy.Plugin.CellTypeHelper.registerCellType("ForguncyPluginTemplate.ForguncyPluginTemplateCellType, ForguncyPluginTemplate", ForguncyPluginTemplateCellType);